from django.db import models

# Create your models here.

class NavInfo(models.Model):
    name = models.CharField(max_length=10,verbose_name='导航名字')
    nhref = models.CharField(max_length=100,verbose_name='导航链接')

class FictionInfo(models.Model):
    fiction_title = models.CharField(max_length=20,verbose_name='小说名字')
    fiction_href = models.CharField(max_length=200,verbose_name='小说链接')
    jianjie = models.CharField(max_length=1000,verbose_name='小说简介')
    author = models.CharField(max_length=1000,verbose_name='小说作者')
    create_time = models.CharField(max_length=1000,verbose_name='创建时间')
    images = models.CharField(max_length=200,verbose_name='小说图片')
    navid = models.ForeignKey(NavInfo)
class ZhangjieInfo(models.Model):
    title = models.CharField(max_length=500,verbose_name='小说章节')
    hrefs = models.CharField(max_length=500,verbose_name='小说链接')
    fiction = models.ForeignKey(FictionInfo)

class TextInfo(models.Model):
    titles = models.CharField(max_length=100,verbose_name='小说章节')
    font = models.CharField(max_length=2000,verbose_name='文本')
    zhangje = models.OneToOneField(ZhangjieInfo)
